/**
 * @Author : goonear
 * @Timestamp : 2017-12-18
 */
var d1 = require("deviceone");
var app = d1.sm("do_App");
var service_url = d1.sm("do_Global");
var cacher = d1.sm("do_DataCache");
var token  = cacher.loadData("token");
/**
 * 设置全局变量
 * 
 */
service_url.setMemory("service_url","http://116.62.224.105/marketing/");
service_url.setMemory("service_url_bac","http://demo.airhwh.com/crmSession/console/");
app.on("loaded", function () {
	if(cacher.hasData("token")){
		app.openPage("source://view/index.ui");
	}else{
		app.openPage("source://view/logReg/login.ui");
	}
});
